import java.util.*;

public class Main {

    class Fenwick{

        int[] tree;
        int n;
        public Fenwick(int[] nums){
            this.n = nums.length;
            this.tree = new int[n+1];
            for(int i=1;i<=n;i++){
                add(i,nums[i-1]);
                int next = lowBit(i)+i;
                if(next<=n){
                    add(next,tree[i]);
                }
            }
        }

        private int lowBit(int n){
            return n&-n;
        }

        public void update(int index,int value){
            for(int i=index;i<=n;i+=lowBit(i)){
                this.tree[i]+=value;
            }
        }

        public int query(int index){
            int ans = 0;
            while(index>=1){
                ans+=tree[index];
                index-=lowBit(index);
            }
            return ans;
        }

        public void add(int index,int value){
            this.tree[index]+=value;
        }
    }


    class UniondFind{
        int[] root;
        UniondFind(int n){
            root = new int[n];
            for(int i=0;i<n;i++){
                root[i] = i;
            }
        }

        public void union(int x,int y){
            if(x>y){
                union(y,x);
            }
            int rootX = find(x);
            int rootY = find(y);
            root[rootY] = rootX;
        }

        public int find(int x){
            if(x == root[x]){
                return x;
            }
            root[x] = find(root[x]);
            return root[x];
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int ans = 0;
        for(long i=1;i<=2025;i++){
            long tmp = (long)Math.pow(i,3);
            if(tmp%10==3){
                ans++;
            }
        }
        System.out.println(ans);
    }
}
